//---------------------------------------------------------------------------

#ifndef KART_PRIBH
#define KART_PRIBH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "Fr_Pribor.h"
#include "cxButtons.hpp"
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxEdit.hpp"
#include "cxGraphics.hpp"
#include "cxGroupBox.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "DBCtrlsEh.hpp"
#include <ActnList.hpp>
#include <DBCtrls.hpp>
#include <Mask.hpp>
#include <Menus.hpp>
#include <DB.hpp>
#include <ComCtrls.hpp>
#include "DBAccess.hpp"
#include "IBC.hpp"
#include "MemDS.hpp"
#include "cxCalendar.hpp"
#include "cxDropDownEdit.hpp"
#include "cxMaskEdit.hpp"
#include "cxTextEdit.hpp"
//---------------------------------------------------------------------------
class TfrKART_PRIB : public TForm
{
__published:	// IDE-managed Components
	TGroupBox *gbPrib;
	TFrame_Pribor *Frame_Pribor1;
	TcxGroupBox *gbPRIB1;
	TLabel *Label1;
	TLabel *Label2;
	TLabel *Label3;
	TLabel *Label4;
	TDBLookupComboBox *cbMESTO;
	TcxGroupBox *gbSTO;
	TLabel *Label9;
	TDBLookupComboBox *cbTO;
	TLabel *Label10;
	TcxGroupBox *gbHAR_PRIB;
	TLabel *Label5;
	TLabel *Label6;
	TLabel *Label7;
	TLabel *Label14;
	TcxGroupBox *gbLIC;
	TLabel *Label12;
	TLabel *Label11;
	TEdit *edLIC;
	TcxButton *btSave;
	TcxButton *btCancel;
	TActionList *aclKartPrib;
	TAction *alSave;
	TAction *alCancel;
	TcxGroupBox *gbPower;
	TLabel *Label13;
	TLabel *labArea;
	TLabel *labRezba;
	TLabel *Label8;
	TAction *alOTKL;
	TLabel *labDAT_POV;
	TDateTimePicker *dtpDAT_POV;
	TDBLookupComboBox *cbISPOLN;
	TEdit *edPOK_UST;
	TEdit *edZAV_NOM;
	TLabel *labProizv;
	TcxDateEdit *dtpDAT_VIP;
	TcxDateEdit *dtpDAT_UST;
	TLabel *labRAZR;
	TLabel *labRAST;
	TEdit *edPLOMB;
	TIBCQuery *dsetHAR_PRIB;
	TIBCDataSource *dsHAR_PRIB;
	TEdit *edAREA;
	TLabel *labPower;
	TcxGroupBox *gbOTKL_PRIB;
	TLabel *lbl1;
	TLabel *lbl2;
	TLabel *lbl3;
	TLabel *labPOK_SH;
	TcxButton *btnOtklPrib;
	TEdit *edPOK;
	TcxButton *btn1;
	TcxButton *btn2;
	TcxDateEdit *dtpDAT_OTKL;
	TDBLookupComboBox *cbPRITH_OTKL;
	TDBLookupComboBox *cbSPOSOB_OTKL;
	TAction *actESC;
	void __fastcall FormShow(TObject *Sender);
	void __fastcall Frame_Pribor1cbMODELClick(TObject *Sender);
	void __fastcall edZAV_NOMKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall dtpDAT_VIPKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall cbMESTOClick(TObject *Sender);
	void __fastcall cbTOClick(TObject *Sender);
	void __fastcall dtpDAT_USTKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall cbISPOLNClick(TObject *Sender);
	void __fastcall edPLOMBKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall edPOK_USTKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall dtpDAT_POVKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall alSaveExecute(TObject *Sender);
	void __fastcall edAREAKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall alCancelExecute(TObject *Sender);
	void __fastcall cbPRITH_OTKLClick(TObject *Sender);
	void __fastcall cbSPOSOB_OTKLClick(TObject *Sender);
	void __fastcall dtpDAT_OTKLKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall edPOKKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall alOTKLExecute(TObject *Sender);
	void __fastcall actESCExecute(TObject *Sender);
	void __fastcall FormClose(TObject *Sender, TCloseAction &Action);

private:	// User declarations
public:		// User declarations
int ADD,NOM,TIP,KOD_PRIB,KART_ABON,NATH_POK,KON_POK,OLD_TRF,PRIZ;
int SOTR,PRITH_ZAM;
TDateTime DAT_ZAM;
__fastcall TfrKART_PRIB(TComponent* Owner);
void __fastcall TfrKART_PRIB::Prepare();
void __fastcall TfrKART_PRIB::VIDIMOST();
void __fastcall TfrKART_PRIB::INF_PO_PRIB(int TIP);
void __fastcall TfrKART_PRIB::RED_PRIB();
int __fastcall TfrKART_PRIB::PROV_NA_ZAP();
void __fastcall TfrKART_PRIB::ZAPOLNI();
void __fastcall TfrKART_PRIB::PO_PRIB();

};
//---------------------------------------------------------------------------
extern PACKAGE TfrKART_PRIB *frKART_PRIB;
//---------------------------------------------------------------------------
#endif
